

# 定义类，属性名与DataFrame列名一致
class DfToObject:
    def __init__(self, **kwargs):
        for key, value in kwargs.items():
            setattr(self, key, value)  # 动态设置属性


#
def setChartType(service_type):
    if service_type == '生长期异常':
        return 'line'
    else:
        return 'bar'